package com.lxr.test5002;

import android.app.Service;
import android.os.Bundle;
import android.os.Vibrator;
import android.widget.Button;
import android.widget.TextView;
import com.lxr.test5002.base.BaseActivity;
import butterknife.BindView;

/**
 * 类描述:[马达测试]
 * 说明:
 * @author: LXR-zsm
 * @Date: 2023/12/15 12:03
 */
public class ZDActivity extends BaseActivity  {
    @BindView(R.id.btn_start)
    Button mBtnStart;
    @BindView(R.id.tv_tip)
    TextView mTvTip;

    public ZDActivity( ) {
        super(R.layout.activity_zd);
    }


    @Override
    protected void initView(Bundle savedInstanceState) {
        mTvTip.setText("马达振动3秒");
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initEvent() {
        mBtnStart.setOnClickListener(v -> {
            Vibrator vib = (Vibrator) ZDActivity.this.getSystemService(Service.VIBRATOR_SERVICE);
            vib.vibrate(3000);
        });
    }



}